﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using Org.BouncyCastle.Utilities.Encoders;

namespace Bitcoin.Test.TestData
{
    class Base58KeysInvalidData : IEnumerable<TestCaseData>
    {
        public IEnumerator<TestCaseData> GetEnumerator()
        {
            var file = "TestData\\base58_keys_invalid.json";
            JArray json;
            using (var tr = new StreamReader(file))
            {
                json = JArray.Parse(tr.ReadToEnd());
            }
            foreach (JArray data in json)
            {
                var base58 = (string) data[0];
                yield return new TestCaseData(base58);
            }
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}
